package com.novax.ex.activity.open.api.inner;

import com.novax.ex.activity.open.model.query.TaskVersionConfigQuery;
import com.novax.ex.activity.open.model.request.task.TaskVersionConfigRequest;
import com.novax.ex.activity.open.model.response.task.TaskVersionConfigResponse;
import com.novax.ex.common.results.ReturnResult;
import com.novax.ex.common.util.PageUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Description: 后台-新手引导版本配置
 *
 * @author shaw
 * @date 2023/6/19 15:03
 */
@Tag(name = "后台 新手引导版本配置", description = "后台 新手引导版本配置")
@FeignClient(url = "${remote.activity-service.endpoint}", name = "TaskVersionConfigApi", contextId = "TaskVersionConfigApi")
public interface TaskVersionConfigApi {

    @Operation(summary = "新手引导版本配置分页查询")
    @GetMapping(value = "/v3/private/tasks/versions")
    ReturnResult<PageUtil<TaskVersionConfigResponse>> page(@ParameterObject TaskVersionConfigQuery query);


    @Operation(summary = "新手引导版本配置修改")
    @PostMapping(value = "/v3/private/tasks/versions/{id}")
    ReturnResult<?> modify(@RequestHeader("language") String language,
                           @PathVariable Long id,
                           @RequestBody TaskVersionConfigRequest taskVersionConfigRequest);

    @Operation(summary = "新手引导版本配置删除")
    @PostMapping(value = "/v3/private/tasks/version/{id}")
    ReturnResult<?> delete(@RequestHeader("language") String language, @PathVariable Long id);

    @Operation(summary = "新手引导版本配置新增")
    @PostMapping(value = "/v3/private/tasks/version")
    ReturnResult<?> add(@RequestHeader("language") String language,
                        @RequestBody TaskVersionConfigRequest taskVersionConfigRequest);

}
